<?php
/**
 * Site entry point.
 *
 * It is not a good idea to render exceptions like done below in production
 * servers. You should log the exceptions and/or present a generic error page,
 * preferably through the ErrorController.
 *
 * @author    Mon Zafra <monzee at gmail>
 * @copyright (c)2009 Mon Zafra
 * @category  Mz
 * @package   demo
 * @license   http://mz-project.googlecode.com/svn/trunk/LICENSE     MIT License
 * @version   SVN: $Id: index.php 4 2009-02-19 05:05:27Z monzee $
 */

require_once '../app/bootstrap.php';

try {
    run();
} catch (Exception $e) {
    $template = '../app/exception.phtml';
    $vars = array('base' => front()->getBaseUrl());

    require_once 'Mz/Exception.php';
    Mz_Exception::render($e, $template, $vars);
}
